package controller;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JFrame;

import model.Adressbook;
import view.ListView;

/**
 * 
 * @author Nelly-Kim TRAN
 * 
 * corresponds to the item "add" in the menu
 * goes from a view to another
 * 
 * @param previousframe
 * 			keeps the previous frame in store to close it afterwards
 *
 */

public class ListmenuListener implements ActionListener{
	
	private JFrame previousframe;
	
	public ListmenuListener(JFrame previousframe) {
		this.previousframe=previousframe;
	}
	

	public void actionPerformed(ActionEvent e) {
		previousframe.setVisible(false);
		previousframe.dispose();
		ListView f= new ListView();
		f.setVisible(true);
		
	}


}
